package com.logistics.pick.mapper;

import com.logistics.pick.entity.domain.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logistics.pick.entity.model.PickInfoRow;
import com.logistics.pick.entity.model.PickQuery;
import com.logistics.product.entity.model.PickOrderDetailRow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * <p>
 * 拣配单 Mapper 接口
 * </p>
 *
 * @author kaihan.wang
 * @since 2024-06-28
 */
@Mapper
public interface PickMapper extends BaseMapper<Pick> {

    /**
     * 根据container查找单据信息
     * @param containerCode
     * @return
     */
    Pick findPickByContainer(String containerCode);

    /**
     * 根据ic查找托盘信息
     * @param pickId
     * @return
     */
    List<PickContainer> findContainers(Integer pickId);


    /**
     * 根据班组和区域查找拣配单
     * @param params
     * @return
     */
    List<PickWorkshop> findByWcCodeAndArea(Map<String, Object> params);


    /**
     * 根据查询条件(拣配单号，erp单据号，状态)查找拣配单信息
     * @param params
     * @return
     */
    List<PickAndErpInvbill> findPickInfoByFilter(PickQuery params);
}
